from applications.extensions import ma
from marshmallow import fields
from applications.models import AccessLog

# 用户models的序列化类
class AccessLogOutSchema(ma.Schema):
    id = fields.Integer()
    user_id = fields.String()
    ip = fields.String()
    flowtotal = fields.Float() # 流量
    city = fields.String()
    access_time = fields.DateTime()
    url = fields.String()
    referer = fields.String()
    userAgent = fields.String()
    isp = fields.String()
    position = fields.String()
